package com.zc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zc.dao.ITcDao;
import com.zc.domain.DoubleListData;
import com.zc.domain.Item;
import com.zc.service.TcService;

@Service(value="tcService")
public class TcServiceImpl implements TcService{
	@Autowired
	private ITcDao tcDao;
	
	@Override
	public DoubleListData getTickCount() {
		List<Item> mainTickCount=tcDao.getTickCount("mtsjgd_live");
		List<Item> subTickCount=tcDao.getTickCount("ftsjgd_live");
		for(Item i:mainTickCount) {
			i.setTimeStamp(i.getTimeStamp().substring(11, 13));
		}
		for(Item i:subTickCount) {
			i.setTimeStamp(i.getTimeStamp().substring(11, 13));
		}		
		return new DoubleListData(mainTickCount,subTickCount);
	}
}
